CC = g++
FLAGS = -g
OBJS = $(patsubst %.cpp,%.o,$(wildcard *.cpp))

%.o: %.cpp
	$(CC) -c $(FLAGS) $<

default: $(OBJS)
	$(CC) $(CFLAGS) *.o -o $@

clean:
	rm *.o
	rm default
